﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using MBS.UserControls.ScreenUserControl;

namespace MBS
{
    public partial class Screen : System.Web.UI.Page
    {
        


        protected void Page_Load(object sender, EventArgs e)
        {
            
            AddScreenUserControl1.ScreenAddComplete += new UserControls.ScreenUserControl.AddScreenUserControl.ScreenAddHandler(AddScreenUserControl1_ScreenAddComplete);
            AddScreenUserControl1.ScreenAddFailed += new UserControls.ScreenUserControl.AddScreenUserControl.ScreenAddHandler(AddScreenUserControl1_ScreenAddFailed);
        }

        void AddScreenUserControl1_ScreenAddFailed()
        {

            string x;

            if (MBSBLC.BLC.ErrorMessage != null)
            {
                x = "Screen Added Failed";
            }
            else
            {
                x = MBSBLC.BLC.GetScreenException();
            }
                        

            ClientScript.RegisterStartupScript(this.GetType(), "sad", "javascript:showAlert('" + x + "')", true);
         
            
        }

        void AddScreenUserControl1_ScreenAddComplete()
        {
            string x = "Screen Added Successfully";

            ClientScript.RegisterStartupScript(this.GetType(), "sad", "javascript:showAlert('" + x + "')", true);
         
        }

       

    }
}